The values of ordinary variables lose their value and are reinitialized.
The values of persistent variables are protected
-
When the structure of the persistent variables in memory matches the structure in the persistent data list.
-
When the persistent data has only been extended. In this case, only the recently added variables are set with their default values.
The values of retain variables are protected
-
When the structure of the retain variables in memory matches the structure in the persistent data list.
-
When the retain variables match the application (GUID has to match).
A "Retain mismatch" occurs when the requirements for restoring the values of retain variables and persistent variables are not met when the application is booted. The response to this inconsistency is described in the documentation of the hardware manufacturer.
For more information see: ⮫ “Preserving Data with Persistent Variables ”